﻿//////////////////////////////////////////////////////////////////////////////////////////////////////
//Name: Bartosz
//FullName: Adamczewski
//Project: InternalClasses
//Component:
//StartDate: 2009-11-23 22:29:58
//EndDate: 2009-11-23 22:29:58
//Description: The implementation of Demo Project.
//Rights: Copyright (c) Bartosz Adamczewski
//////////////////////////////////////////////////////////////////////////////////////////////////////


#region imports.

using System;
using System.Reflection;
using System.Threading;
using System.Text;
using InternalClasses.Context;

#endregion 

namespace DemoProject
{
    class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("This Demo Shows only the Attribute Programming Features. For more detailed info refer to the documentation.\n");

            IContext context = new InjectionContext();

            context.Register<Test, ITest>();
            ITest test = context.GetFromContext<Test, ITest>();
     
            //method gets validated, and the console write action is performed.
            test.DoSomething(1, new StringBuilder());
            test.TestSum(1, 2);
            //new class injected insted of the old one test2.
            test = test.CreateTest(test);
            test.DoSomething(1, new StringBuilder());

            Console.WriteLine("This Concludes the Demo");
            Console.Write("Press any key to continue . . . ");
            Console.ReadKey(true);

        }
    }
}